package com.baizhi.entity;

import java.io.Serializable;
//对应First连接中的second数据库中的t_product表
//实现序列化接口  该类的对象才能进行序列化
public class Product implements Serializable {
    private Integer pid;
    private String pname;
    private Double price;//商品单价
    private Integer stock;//库存
    private String des;//商品描述

    public Product() {
    }

    public Product(Integer pid, String pname, Double price, Integer count, String des) {
        this.pid = pid;
        this.pname = pname;
        this.price = price;
        this.stock = stock;
        this.des = des;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    @Override
    public String toString() {
        return "Product{" +
                "pid=" + pid +
                ", pname='" + pname + '\'' +
                ", price=" + price +
                ", stock=" + stock +
                ", des='" + des + '\'' +
                '}';
    }
}
